package study.designpattern.vistorpattern.visitor;

import study.designpattern.vistorpattern.element.Body;
import study.designpattern.vistorpattern.element.Engine;
import study.designpattern.vistorpattern.element.Wheel;

public class CarElementPrintVisitor implements IVisitor{

    @Override
    public void vistor(Engine carElement) {
        System.out.println("this is " + carElement.getClass().getSimpleName());
    }

    @Override
    public void vistor(Wheel carElement) {
        System.out.println("this is " + carElement.getClass().getSimpleName());
    }

    @Override
    public void vistor(Body carElement) {
        System.out.println("this is " + carElement.getClass().getSimpleName());
    }

}
